package box10;

import java.util.Arrays;

public class two {
    public static void main(String[] args) {
        String []a = new String[]{"a","aa","aaa"};
        Arrays.sort(a, (o1, o2) -> {
            if(o1.length()-o2.length()>0){
                return -1;
            }
            else return 1;
        });
        System.out.println(Arrays.toString(a));
    }
}
